import request from "@/utils/request"
import { type deletype } from "@/types/Albums"
enum API {
    base_url = '/albums'
}

export const get_imag = (data: { year: number, month: number }, id: number) => request({
    method: "get",
    url: API.base_url + `/${data.year}/${data.month}/${id}`,
    data
})

export const post_img = (data: any) => request({
    method: "post",
    url: API.base_url + '/many',
    data
})

export const delete_img = (data: deletype) => request({
    method: "delete",
    url: API.base_url + `/${data.year}/${data.month}/${data.day}`,
    data: {
        img: data.img
    }

})